﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public enum GameState {
	Gameing,
	GamePause,
	GameEnd
}

public class Game : MonoBehaviour {
	public Mediator mediator;
	void Awake () {
		mediator = new Mediator ();

		mediator.Init ();
	}

	void Start () {
		mediator.Start ();
	}
	void Update () {
		if (mediator.gameState == GameState.GameEnd) {
			if (Input.GetKeyDown (KeyCode.Space)) {
				mediator.Start ();
			}
		}
		if (mediator.gameState!=GameState.Gameing)return;
		mediator.Update ();
	}
}